<?php
/*
**简单ThinkSAAS 业务后台管理系统
**admin/index.php
**By QINIAO
*/

require_once('../init.php');

//管理首页
if($action == '')
{
if(empty($cookienum) || $admin != 1)
{
header("Location: index.php?action=login");
}

include "view/admincp.html";
}

//基本信息
if($action == 'main')
{
require_once('inc_main.php');
include "view/main.html";
}

//网站配置
if($action == 'option')
{
require_once('inc_option.php');
include "view/option.html";
}

//话题管理
if($action =='cate')
{
require_once('inc_cate.php');
include "view/cate.html";
}

//用户管理
if($action == 'user')
{
require_once('inc_user.php');
include "view/user.html";
}

//微博管理
if($action == 'mlog')
{
require_once('inc_mlog.php');
include "view/mlog.html";
}

//评论管理
if($action == 'comment')
{
require_once('inc_comment.php');
include "view/comment.html";
}

//友情链接管理
if($action == 'link')
{
require_once('inc_link.php');
include "view/link.html";
}

//广告管理
if($action == 'ads')
{
require_once('inc_ads.php');
include "view/ads.html";
}

//CMS管理
if($action == 'cms')
{
require_once('inc_cms.php');
include "view/cms.html";
}
//CMS分类
if($action == 'cms_cate')
{
require_once('inc_cms_cate.php');
include "view/cms_cate.html";
}


//登录
if($action == 'login')
{
require_once('inc_login.php');
include "view/login.html";
}

//退出
if($action == 'logout')
{
header("Content-Typy:text/html; Charset=utf-8");
setcookie('username',time()-1);
setcookie('password',time()-1);
header("Location: index.php?action=login");
}

?>